ImportRTF

Hi all,

This happens for both the GUI method and the DXL method.

I'm importing a set of headings and texts from Word to put into a module as objects.

However, I've got a script that creates new columns as well.

The problem is that whenever I import whether by GUI or DXL, the text is pasted into every single column in my module. I just want it to be in one column.

I made sure I imported the file before the columns were inserted, but the problem is still there. Sort of suggests that it's the way DOORS imports the RTF and not how I declare my column inserts.

Have a look at the snippet:

void View1(Module m) //custom function to insert views/attributes
{
current = m

//custom views - Different set of columns for each view; this is for a single view
Column c
int i, n = 0

//delete existing columns (use delete column 0 as columns keep shifting left)
for c in m do
{
n++
}//Counts number of columns
for i in 1:n do
{
delete (column 2)//deletes columns for all n
}
//module settings
level(0)
graphics(false)
outlining(false)
showTables(true)
showDeletedObjects(false)
showExplorer(m)

//after deleting, create the new columns
c = insert column 2
title(c, "Test View Column 1")
main(c)
graphics(c)
info(c)
width(c,100)
justify(c,left)

//save view
save(view("Test View 1"))

}

From what I understand, what the manual means is that new columns are created to the right of the selected column number n = 0,1,2,3

So if I create a column at n=2, it will be to the right of columns "ID" and "Prefix".

I would think that this would stop the text from Prefix being pasted in column n=2, but it doesn't work.

Any ideas?

Regards,

TooDiff
TooDifficult - Wed Dec 08 23:09:45 EST 2010

Re: ImportRTF
Bob_Swan - Thu Dec 09 03:27:56 EST 2010

The snippet presented is only creating columns that display the 'Main' column, thus will show the headings and text combined.
If you're trying to show other attributes, or the heading/text alone then you need to replace the 'main (c)' line with 'attribute(c, "attrname")'

Re: ImportRTF
TooDifficult - Thu Dec 09 17:11:14 EST 2010

Bob_Swan - Thu Dec 09 03:27:56 EST 2010
The snippet presented is only creating columns that display the 'Main' column, thus will show the headings and text combined.
If you're trying to show other attributes, or the heading/text alone then you need to replace the 'main (c)' line with 'attribute(c, "attrname")'

Hi Bob,

Thanks for the reply.

This explains everything thanks so much!

-TooDiff